# -*- coding: utf-8 -*-
import logging
import qrcode
import base64
from io import BytesIO
from odoo import api, fields, models
from PIL import Image, ImageFont, ImageDraw
from odoo import tools, _
from odoo.exceptions import ValidationError, AccessError
from odoo.modules.module import get_module_resource
import json

_logger = logging.getLogger(__name__)


class AttachmentManagement(models.Model):
    _name = "attachment.management"
    _order = 'id desc'

    file = fields.Binary(string="File Attachment")
    file_name = fields.Char(string="File Name")
    name = fields.Char(string="Name", required=True)
    version= fields.Char(string="version", required=True)
    Explain = fields.Text(string="Explain")
    # 客户端APP/厨房端APP/文档/其他
    file_type = fields.Selection([('user_client',u'Client APP'),('merchant_client',u'Kitchen APP'),('doc',u'Document'),('other',u'Other')], u"File Type" , default="user_client")



